//package com.daocao.hua.adapter;
//
//import android.content.Context;
//import android.content.Intent;
//import android.view.View;
//import android.widget.RelativeLayout;
//
//import com.daocao.hua.activity.DealDetailActivity;
//import com.daocao.hua.R;
//import com.daocao.hua.adapter.base.BaseRViewSubAdapter;
//import com.daocao.hua.adapter.base.BaseViewHolder;
//import com.daocao.hua.interfaces.OnRecyclerViewListener;
//import com.daocao.hua.model.DealDetailModel;
//
//import java.util.List;
//
//
///**
// * 交易明细
// * Created by MasterDong on 16/4/12.
// */
//
//public class DealDetaiAdapterNew extends BaseRViewSubAdapter<DealDetailModel.DataList> {
//
//
//    private OnRecyclerViewListener onRecyclerViewListener;
//
//    public void setOnRecyclerViewListener(OnRecyclerViewListener onRecyclerViewListener) {
//        this.onRecyclerViewListener = onRecyclerViewListener;
//    }
//
//    private Context mContext;
//    private List<DealDetailModel.DataList> list;
//    private int type;
//
//    public DealDetaiAdapterNew(Context context, List<DealDetailModel.DataList> list, int type) {
//        super(context, R.layout.deal_detail_items, list);
//        this.list = list;
//        this.mContext = context;
//        this.type = type;
//    }
//
//
//    @Override
//    protected void convert(BaseViewHolder viewHoder, DealDetailModel.DataList item, final int position) {
//        DealDetailModel.DataList mode = item;
//        viewHoder.getTextView(R.id.date).setText(mode.getCreate_time_format());
//        viewHoder.getTextView(R.id.money).setText(mode.getMoney());
//        viewHoder.getTextView(R.id.type).setText(mode.getType_name());
//        RelativeLayout more = (RelativeLayout) viewHoder.getView(R.id.more);
//        if (position == 9 && list.size() <= 10 && type == 1) more.setVisibility(View.VISIBLE);
//
//        more.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View view) {
//                mContext.startActivity(new Intent(mContext, DealDetailActivity.class));
//            }
//        });
//
//        View rootView = viewHoder.getView(R.id.loan_record_item);
//        rootView.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                if (null != onRecyclerViewListener) {
//                    onRecyclerViewListener.onItemClick(list, position);
//                }
//            }
//        });
//        rootView.setOnLongClickListener(new View.OnLongClickListener() {
//            @Override
//            public boolean onLongClick(View v) {
//                if (null != onRecyclerViewListener) {
//                    return onRecyclerViewListener.onItemLongClick(list, position);
//                }
//                return false;
//            }
//        });
//
//    }
//
//
//}
//
